const sequelize = require("./db");
const { DataTypes } = require("sequelize");
//检查记录表
const Model = sequelize.define(
  "record",
  {
    id: {
      type: DataTypes.UUID,
      primaryKey: true,
      defaultValue: DataTypes.UUIDV4,
    },
    name: {
      type: DataTypes.STRING,
      allowNull: false,
    },
    pos: {
      type: DataTypes.STRING,
      allowNull: false,
    },
    sex: {
      type: DataTypes.INTEGER,
    },
    age: {
      type: DataTypes.INTEGER,
    },
    history: {
      type: DataTypes.STRING,
    },
    result: {
      type: DataTypes.STRING,
    },
    startAt: {
      type: DataTypes.DATE,
    },
    videos: {
      type: DataTypes.STRING,
    },
    endAt: {
      type: DataTypes.DATE,
    },
    magic1: {
      type: DataTypes.STRING,
    },
    magic2: {
      type: DataTypes.STRING,
    },
    magic3: {
      type: DataTypes.STRING,
    },
    magic4: {
      type: DataTypes.STRING,
    },
    magic5: {
      type: DataTypes.STRING,
    },
  },
  {
    timestamps: true,
    freezeTableName: true,
  }
);
module.exports = Model;
